﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MockPrjTeam2.DAO;
using MockPrjTeam2.Entity;

namespace MockPrjTeam2.Biz
{
    public class ContactBiz
    {
        ContactDao dao = new ContactDao();       
        public List<Contact> getAllContactByKey(string fname,string sname,bool active)
        {
            var listContact = new List<Contact>();
            return listContact = dao.getAllContactByKey(fname, sname,active);
        }
        public List<Contact> getContactType()
        {
            var listContact = new List<Contact>();
            return listContact = dao.getContactType();
        }
        public bool addContact(Contact contact)
        {
            return dao.addContact(contact);
        }
        public bool updateContact(Contact contact)
        {
            return dao.updateContact(contact);
        }
        public bool updateIsActive(int id, bool active)
        {
            return dao.updateIsActive(id,active);
        }
        public Contact getById(int id)
        {
            return dao.getById(id);
        }
        public Contact getContactDetail(int id)
        {
            return dao.getContactDetail(id);
        }
    }
}